const loaderUtils = require('loader-utils');
const validateOptions = require('schema-utils');
const {JSDOM, VirtualConsole} = require('jsdom');
const path = require('path');
const styleLoader = require('./loaders/styleLoader');

let schema = {
    'type': 'object',
    'properties': {
        'style': {
            'type': 'object',
            'properties': {
                'sass': {
                    'type': 'boolean'
                },
                'less': {
                    'type': 'boolean'
                },
                'stylus': {
                    'type': 'boolean'
                },
            }
        },
        'template': {
            'type': 'object',
            'properties': {
                'jade': {
                    'type': 'boolean'
                }
            }
        },
    },
    'errorMessage': {
        'option': 'should be {Boolean} (https:/github.com/org/repo#anchor)'
    },
    'additionalProperties': false
};
module.exports = function (content, map, meta) {
    let template = /(?:<template>)(.*)(?:<\/template>)/gim;
    let style = styleLoader(this, content);
    let callback = this.async();
    let a = `a {
  font-weight: bold;
  text-decoration: none;
  &:hover { text-decoration: underline; }
}
`;
    console.log(this.loaders);
    console.log(loaderUtils.stringifyRequest(this, this.resourcePath));
    console.log(loaderUtils.stringifyRequest(this, '../node_modules/css-loader/index.js'));
    callback(null, JSON.stringify(a), map, meta);
};

